home *** CD-ROM | disk | FTP | other *** search
/ The Games Machine 75 / XENIATGM75.iso / Shareware / X-Setup 5.0 / _SETUP.1 / XQ Context Menu Options.xpl < prev    next >
Text File  |  1999-06-26  |  3KB  |  106 lines

  1. "FILE"="Xteq Systems X-Setup Plugin 5.0"
  2. "TYPE"="6"
  3. "COUNT"="3"
  4. "UIPATH"="Appearance\Explorer\Context Menu"
  5. "NAME"="Context Menu Options"
  6. "VERSION"="1.52"
  7. "LANGUAGE"="VBScript"
  8. "TEXT 1"="Enable QuickView for any file"
  9. "TEXT 2"="Enable "Open with..." for any file"
  10. "TEXT 3"="Enable "DOS Prompt Here" command for directories"
  11. "DESCRIPTION 1"="If you activate "Enable QuickView for any file", you can right-click any file and select "QuickView" from the appearing menu to have a look on it."
  12. "DESCRIPTION 2"="Note: It can happen that, if this option is activated and you are using the Microsoft Office 97 Shortcut Bar, the Shortcut Bar does no longer work correctly. In this case, deactivate this option again and restart your PC."
  13. "DESCRIPTION 3"="Enable "Open with..." to easily change which program is used to open a file (by default, you need to hold down SHIFT and right-click a file to display this item). If it's activated, this option is automatically visible."
  14. "DESCRIPTION 4"="If "DOS Prompt Here" (originally from the Microsoft Windows 95 Power Toys) is enabled, the command "DOS Prompt Here" will appear if you right-click a directory."
  15. "DESCRIPTION 5"="Selecting this item will open a DOS box where the path has been changed to the selected directory."
  16. "AUTHOR"="Xteq Systems"
  17. "COPYRIGHT"="Copyright ⌐ Xteq Systems - All Rights Reserved"
  18. "COMMENT 1"="For more information, go to http://www.xteq.com or write to TeXHeX@xteq.com."
  19.  
  20.  
  21. bQE=true
  22. bDH=true
  23. Sub Plugin_Initialize 
  24.  s=RegReadValue("HKCR\*\QuickView\@")
  25.  if s="*" then 
  26.   SetUIElement 1,true
  27.  else
  28.   bQE=false
  29.  end if
  30.  
  31.  s=RegReadValue("HKCR\*\Shell\openas\command\@")
  32.  if not IsEmpty(s) then
  33.   SetUIElement 2,true
  34.  else
  35.   SetUIElement 2,false
  36.  end if
  37.  
  38.  
  39.  s=RegReadValue("HKCR\Directory\Shell\DosHere\Command\@")
  40.  'Call DebugMsg(s)
  41.  if Len(s)>0 then
  42.   SetUIElement 3,true
  43.  else
  44.   bDH=false
  45.  end if 
  46. End Sub
  47.  
  48. Sub Plugin_CheckData(ElementIndex)
  49. End Sub
  50.  
  51. Sub Plugin_Apply(ElementIndex,ElementSubIndex)
  52.  b=GetUIElement(1)
  53.  if b=true then
  54.   Call RegWriteValue("HKCR\*\QuickView\@","*",1)
  55.  else
  56.   if bQE=true then
  57.    Call RegDeletePath("HKCR\*\QuickView")
  58.   end if
  59.  end if
  60.  
  61.  
  62.  b=getuielement(2)
  63.  if b=true then
  64.   call RegWriteValue("HKCR\*\Shell\openas\command\@","rundll32.exe shell32.dll,OpenAs_RunDLL ""%1""",1)
  65.  else
  66.   'delete! lts of work!
  67.   if RegPathExists("HKCR\*\Shell\openas\command") then
  68.      Call RegDeletePath("HKCR\*\Shell\openas\command")
  69.   end if
  70.  
  71.   if RegPathExists("HKCR\*\Shell\openas") then
  72.      Call RegDeletePath("HKCR\*\Shell\openas")
  73.   end if
  74.  end if
  75.  
  76.  
  77.  
  78.  s=""
  79.  b=GetUIElement(3)
  80.  if b=true then
  81.   if GetWinVer=1 or GetWinVer=3 then
  82.    'Windows 95/98
  83.    s=GetWinDir
  84.    s=s & "command.com /k cd ""%1"""
  85.   else
  86.    'Windows NT
  87.    s=GetWinSysDir
  88.    s=s & "cmd.exe /k cd ""%1"""
  89.   end if
  90.  
  91.   Call RegWriteValue("HKCR\Directory\Shell\DosHere\@","DOS &Prompt Here",1)
  92.   Call RegWriteValue("HKCR\Directory\Shell\DosHere\Command\@",s,1)
  93.  else 'Disable it!
  94.   if bDH=true then
  95.    Call RegDeletePath("HKCR\Directory\Shell\DosHere\Command")
  96.    Call RegDeletePath("HKCR\Directory\Shell\DosHere")
  97.   end if
  98.  end if
  99.  
  100.  
  101.  
  102. End Sub
  103.  
  104. Sub Plugin_Terminate 
  105. End Sub
  106.